package com.smu.recognize.model.common;

import com.smu.recognize.model.Attendance;

import java.io.Serializable;
import java.util.List;

public class JsonReturn implements Serializable {
    public static final int ACCESS_TOKEN_INVALID = 50;
    private static final long serialVersionUID = -3178311798271149208L;
    private Integer code;
    private Boolean success;
    private String msg;
    private List<?> data;

    public JsonReturn(){
    }
    public JsonReturn(boolean success) {
        this.success = success;
    }
    public JsonReturn(boolean success,Integer code) {
        this.success = success;
        this.code=code;
    }

    public JsonReturn(boolean success, String msg) {
        this.success = success;
        this.msg = msg;
    }

    public JsonReturn(String msg) {
        this.msg = msg;
    }

    public JsonReturn(boolean success, String msg, List<?> data) {
        this.success = success;
        this.msg = msg;
        this.data = data;
    }
    public JsonReturn(boolean success,Integer code, List<?> data) {
        this.success = success;
        this.code = code;
        this.data = data;
    }


    public void putList(String key,List<?> list){
        this.data =list;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<?> getData() {
        return data;
    }

    public void setData(List<?> data) {
        this.data = data;
    }
}
